package com.kasax.httpsupport;

import java.io.IOException;
import java.io.OutputStream;

/**
 * 请求体
 */
public abstract class RequestBody {
    /**
     * body的类型
     *
     * @return
     */
    abstract String contentType();

    /**
     * 将body的内容写出去
     *
     * @param os
     * @throws IOException
     */
    abstract void writeTo(OutputStream os) throws IOException;

}
